import 'package:flutter/cupertino.dart';

class AppButton extends StatelessWidget {
  const AppButton({
    super.key,
    required this.child,
    this.padding = EdgeInsets.zero,
    this.color,
    this.disabledColor = CupertinoColors.quaternarySystemFill,
    this.minSize = 0,
    this.pressedOpacity = 0.4,
    this.borderRadius = BorderRadius.zero,
    this.alignment = Alignment.center,
    required this.onPressed,
  });

  final Widget child;
  final EdgeInsetsGeometry padding;
  final Color? color;
  final Color disabledColor;
  final VoidCallback? onPressed;
  final double? minSize;
  final double? pressedOpacity;
  final BorderRadius? borderRadius;
  final AlignmentGeometry alignment;

  @override
  Widget build(BuildContext context) {
    return CupertinoButton(
      padding: padding,
      color: color,
      disabledColor: disabledColor,
      minSize: minSize,
      pressedOpacity: pressedOpacity,
      borderRadius: borderRadius,
      alignment: alignment,
      onPressed: onPressed,
      child: child,
    );
  }
}
